package com.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
@Table(name = "tb_sys_usersetting")
public class UserSettingBean implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -5043980237462513587L;
	@Id
	@GenericGenerator(name = "idGenerator", strategy = "sequence", parameters = { @Parameter(name = "sequence", value = "user_info_id") })
	@GeneratedValue(generator = "idGenerator")
	private Long id;
	private String setting_key;
	private String setting_value;
	
	
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
    @JoinColumn(name="user_account")//加入一列作为外键
	private UserBean user_account;
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getSetting_key() {
		return setting_key;
	}

	public void setSetting_key(String setting_key) {
		this.setting_key = setting_key;
	}

	public String getSetting_value() {
		return setting_value;
	}

	public void setSetting_value(String setting_value) {
		this.setting_value = setting_value;
	}

	public UserBean getUser_account() {
		return user_account;
	}

	public void setUser_account(UserBean user_account) {
		this.user_account = user_account;
	}

}
